﻿<link href="/UI/css/components/topnavi.min.css" rel="stylesheet" />
<link href="/UI/fonts-m/soicon-m.min.css" rel="stylesheet" />
<template>
    <div id="top-navibar" class="col-lg-12">
        <div class="row">
            <div id="site-logo-wraper">
                <a class="LinkBlock" href="/index.html" id="site-logo"></a>
            </div>

            <div id="menu-container">
                <a class="LinkBlock navi-item" href="#" v-on:click="ShowFullMenu" id="navi-full-menu">更多应用 ></a>
                <a class="LinkBlock navi-item focus" href="/SoBiz/BizHome.html">供应链协同</a>
                <a class="LinkBlock navi-item" href="/crm/home.html">CRM协同</a>
            </div>
            <div id="user-tools">
                <a class="LinkBlock navi-item" href="/my/index"><img :src="User.headimg" />{{User.name}}</a>
                <a class="LinkBlock navi-item" href="/my/message"><i class="soicon icon-notification"></i> 消息</a>
                <a class="LinkBlock navi-item" href="#" onclick="SoBiz.LoginOut()"><i class="soicon icon-power-switch"></i> 退出</a>
            </div>
        </div>
        <div id="pnl-full-menu">
            <div id="material-apps" class="row">
                <h5><i class="soicon icon-node-process"></i>供应链协同</h5>
                <div class="row">
                    <div class="col-lg-6 app-group">
                        <h5 class="ag-title">采购</h5>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Purchase/inquiries">
                            <i class="soicon-m icon-invite-bidding"></i>
                            邀标/询价
                        </a>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Purchase/orders">
                            <i class="soicon-m icon-orderbill"></i>
                            采购订单
                        </a>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Purchase/receipt">
                            <i class="soicon-m icon-receipt"></i>
                            收货
                        </a>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Purchase/patrol">
                            <i class="soicon-m icon-buyer-qc"></i>
                            巡检
                        </a>
                    </div>
                    <div class="col-lg-6 app-group">
                        <h5 class="ag-title">销售</h5>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Sale/quotation">
                            <i class="soicon-m icon-tender"></i>
                            回标/报价
                        </a>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Sale/orders">
                            <i class="soicon-m icon-orderbill"></i>
                            销售订单
                        </a>
                        <a class="LinkBlock ag-item" target="_blank" href="/Material/Sale/delivery">
                            <i class="soicon-m icon-truck"></i>
                            发货
                        </a>
                    </div>
                </div>
            </div>
            <br />
            <div id="crm-apps" class="row">
                <h5><i class="soicon icon-admin-acnt"></i>CRM协同</h5>
                <div class="row app-group">
                    <a class="LinkBlock ag-item" target="_blank" href="/CRM/projects">
                        <i class="soicon icon-office"></i>
                        楼盘管理
                    </a>
                    <a class="LinkBlock ag-item" target="_blank" href="/Crm/projreview">
                        <i class="soicon icon-certification"></i>
                        楼盘审核
                    </a>
                    <a class="LinkBlock ag-item" target="_blank" href="/CRM/cstfollow">
                        <i class="soicon icon-yonghu"></i>
                        客户跟进
                    </a>
                </div>
            </div>
            <br />
            <div id="admin-apps" class="row">
                <h5><i class="soicon icon-settings"></i>系统管理</h5>
                <div class="row app-group">
                    <a class="LinkBlock ag-item" target="_blank" href="/Admin/company">
                        <i class="soicon icon-office"></i>
                        公司
                    </a>
                    <a class="LinkBlock ag-item" target="_blank" href="/Admin/org">
                        <i class="soicon icon-departments-copy"></i>
                        组织架构
                    </a>
                    <a class="LinkBlock ag-item" target="_blank" href="/Admin/employee">
                        <i class="soicon icon-account"></i>
                        员工
                    </a>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    opt={
        mounted: function () {

            let vTopNavi = this;
            SoBiz.Login(function (usr) {
                vTopNavi.User = usr;
            }, function () { console.log('login fail'); });

            vTopNavi.pnlFullMenu = new LiberUI.PopPanel("#pnl-full-menu");
            vTopNavi.pnlFullMenu.option("ShowWay", function (elm) {
                elm.addClass("ani-flade-in-up").show();
                var v = this.PopFor().addClass("active");
                LayoutHelper.PosToBody(v, elm, "down-left", { top: -1 });
            }).option("HideWay", function (elm) {
                elm.removeClass("ani-flade-in-up").hide();
                this.PopFor().removeClass("active");
            });
            vTopNavi.pnlFullMenu.PopFor("#navi-full-menu");
        },
        data: function () {
            return {
                User: {
                    name: '您好',
                    headimg: '/ui/imgs/default-user-headimg.jpg'
                },
                pnlFullMenu:null,
                Config: RES.SiteConfig
            }
        },
        methods: {
            ShowFullMenu: function () {
                this.pnlFullMenu && this.pnlFullMenu.show();
            }
        }
    }
</script>
